package org.kms.Controllers;

import org.kms.dao.parentsDao;
import org.kms.pojo.Parents;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/Parents")
@CrossOrigin(value = "*")
public class parents {
    @Autowired
    private parentsDao parentsDao;

    @RequestMapping("/getbypid")
    @ResponseBody
    public List<Parents> getbypid(Integer pid)throws Exception{
        return parentsDao.getbypid(pid);
    }
}
